package 每日一题OJ;

/**
 * @author shy_black
 * @date 2019/8/19 21:13
 * @Description:
 */
public class _326_3的幂 {

    public boolean isPowerOfThree(int n) {
        long sum = 1;
        while(sum < n) {
            sum *= 3;
        }
        if(sum == n)
            return true;
        else
            return false;
    }
}